<?php

/**
 * page actions.
 *
 * @package    hacride
 * @subpackage page
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
 */
class pageActions extends autopageActions
{
  protected function updatePageFromRequest()
  {
    $page = $this->getRequestParameter('page');

    if (isset($page['title']))
    {
      $this->page->setTitle($page['title']);
    }
    if (isset($page['body']))
    {
      $this->page->setBody($page['body']);
    }
    if (isset($page['lang_id']))
    {
    $this->page->setLangId($page['lang_id'] ? $page['lang_id'] : null);
    }
    
    if (isset($page['slug']))
    {
      $this->page->setSlug($page['slug']);
    }
    else 
    {
      $this->page->setSlug($page['title']);
    }
    
    if (isset($page['meta_desc']))
    {
      $this->page->setMetaDesc($page['meta_desc']);
    }
    if (isset($page['meta_title']))
    {
      $this->page->setMetaTitle($page['meta_title']);
    }
  }
}
